<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        *{
            padding:0;
            margin: 0;
        }
        html{
            border:5px solid;
            margin:10px;
        }
        .box01{
            width: 200px;
            background-color: yellow;
           /* position: absolute;
            right: 0;
            top: 0;*/
        }
        .box01:after{
            content: "";
            display: block;
            clear:both;
        }
        .box02{
            width: 50%;
            height: 100px;
            background-color: green;
            margin: 100px;
            float:right;
        }
    </style>
</head>
<body>
    <div class="box01">
        <div class="box02"></div>
    </div>

</body>
</html>